class CreatePosts < ActiveRecord::Migration
  def change
    create_table :posts do |t|
      t.string :title, null: false
      t.string :slug
      t.text :body
      t.datetime :published_at
      t.datetime :deleted_at

      t.timestamps
    end

    add_index :posts, :slug
    add_index :posts, :published_at
    add_index :posts, :deleted_at
  end
end
